package com.lq.educationsystem.socre.mapper;

import com.lq.educationsystem.socre.entiy.ScoreTb;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Administrator
* @description 针对表【score_tb】的数据库操作Mapper
* @createDate 2024-04-27 09:30:23
* @Entity com.lq.educationsystem.socre.entiy.ScoreTb
*/
public interface ScoreTbMapper {

    int deleteByPrimaryKey(Long id);

    int insert(ScoreTb record);

    int insertSelective(ScoreTb record);

    ScoreTb selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ScoreTb record);

    int updateByPrimaryKey(ScoreTb record);

    /**
     * 查询所有数据
     * @param start
     * @param pageSize
     * @param scoreTb
     * @return
     */
    List<ScoreTb> queryList(@Param("start") int start,@Param("pageSize") Integer pageSize,@Param("scoreTb") ScoreTb scoreTb);

    /**
     * 查询所有数
     * @param scoreTb
     * @return
     */
    int queryCount(@Param("scoreTb") ScoreTb scoreTb);

    /**
     * 通过学生id和课程id 查学生分数
     * @param subjectIdList
     * @param studentId
     * @return
     */
    List<ScoreTb> queryStudentScoreBySubjectIdAndStudentId(@Param("subjectIdList") List<Integer> subjectIdList,@Param("studentId") Integer studentId);

    List<ScoreTb> querySubjectStudentScoreByStudentId(@Param("studentIdInfoList") List<Integer> studentIdInfoList,@Param("subjectId") Integer subjectId);


    int addSubjectStudentScoreByStudentIdAndSubjectId(@Param("studentIdInfoList") List<Integer> studentIdInfoList,@Param("subjectId") Integer subjectId);

    int updateStudentScoreByStudentIdAndSubjectId(@Param("scoreTb") ScoreTb scoreTb);
}
